v0.1: Very primitive. v0.2: Problems...not so nice problems. v0.3: This would segfault before you even got to the opening the modem. v0.4: Made it a little nicer. v0.5: This originally started with just sequential scanning. After random scanning being requested, I added that within an hour. v0.5-0.9: Not worth documenting...blah blah blah. Problems were bein fixed here....still not public. v1.0: An exit() in the wrong place ;) So that was obvious a BIG problem I put an exit in check_for_error() so it would exit obviously...which it shouldn't of ;) I had this during debugging/testing (v0.1-v0.5). It was now made public and given to a few beta-testers. v1.1: Changed sleep() to alarm(). Now it will go the next number as soon as it connects or times out (whichever comes first). Before it just waited and then checked. v1.2: Well...I was able to open /dev/cua1 for dialing and /dev/ttyS1 for hanging up..but some OS's might not even have two serial devices per file. When I originally wrote this...I only used one serial file. I had been using one serial file in the first place, but I had not hung up the proper way. So it's USING 1 SERIAL DEVICE now. v1.3: Just improved it to look nicer. Made the output a little more under- standable and nicer. *UPGRADE TO AT LEAST HERE* -------------------------- v2.0: Many, many changes. I spent two days straight between these versions going through everything. Everything looks nicer, and works. In the previous versions...the random wouldn't of worked due to how I did it. But it will work just fine now. Random works right, added more things to be logged. I will add the date of start/stop, statistics, etc. In the next few versions.. also expect a GUI as soon. v2.1: Added a lot of color to make it more "exciting" I suppose. The colors are ANSI color codes, that I used, are in colors.h Fixed a minor problem that would print "Last Number Dialed: Last Number Dialed was ..." *Fixed bug with logging* v2.2: I had a lot of changes here. I fixed the 'not logging' bug, so everything will log fine now. I changed the data types (from strings to integers), and I took out a lot of unimportant buffers, things slowing everything down, etc. IF YOU WANT YOUR LOGGING TO WORK..GET THIS ONE. Added some more color, fixed it up a bit more. v2.3: Now logs the date when scanning started/stopped, took out a lot of unneeded sprintf()'s, improved a few little mistakes, etc. *It would be a good idea to upgrade to here* v2.4: You should probably upgrade to here. I added a new function checkok() so that it checks for an "OK" from the modem after initializing it, hanging up, etc., to make sure the modem is listening and working properly. This would help you with diag- nostics should need it be. This also fixed a previous problem, when initializing the modem, if it didn't get an "OK", it would exit...but I forgot to hangup() and close() the modem's fd! So it would certainly be a good idea to upgrade to here. Oh and another important thing. check_for_error() now logs to the log file when it doesn't get all the bytes it was expecting written. checkok() also writes to the logfile when it doesn't receive an okay. *** UPGRADE TO HERE!!! (A MUST) *** Reason: Ever since I've been using just one serial file (v1.2), I haven't been hanging up the right way. +++ and ATH are still sent to a remote host when connected. I needed to close and reopen the modem when connected. This is now fixed. All is fine for now...dials fine, hangs up fine, logs fine, connects fine, color is fine (well, I hope you like the colors :P). v2.5: *Many changes here*. Changes were: 1) new way to hangup (if connected) 2) new variables used to: a) increase speed b) allow us to reuse functions c) cut down in size (See connected, and noshow) It wasn't waiting for "OK" while initializing the modem. I added a one second pause to give the modem a change to respond to ATZ. Obviously the bug hadn't been there before v2.4 as that was a new feature. Secondly, if I the modem didn't send me an "OK", then checking for an "OK" with hangup() doesn't do too much good. Added a variable to check for this. When sending "+++ATH" to the modem while connected, it's sent to the remote as l: +++ p: ATH that's not a very good failed log attempt to be logged ;) So what we did is closed the modem, and then reopened it to hang up. I added new variables to allow me to reuse functions, cut back on code, increase speed (i.e. I use if (connected == 1) rather than two strstr()'s in a row now. These were basically two different versions but I decided to leave it as one version since they are closely related. v2.6: Okay, the list of options was starting to get a little long, so I added a getopt(). The way it reads numbers now, has changed. Rather than using get_num(), and get_scannum(), it was just ask for the whole number 555-555-1111, rather than the last for digits (1111), seperately. The new functions is get_scanrange(). This will be more convient, although now now get_scanrange() is more compact. v2.7: You can, scan different ranges, like instead of just 555-XXXX, you could now scan 555-XXXX through 556-XXXX. The same applies to long distance as well. v2.8: You can now give -d to daemonize (run in the background). Also, fixed a small bug, that didn't exit(), when it failed to receive an "OK" from the modem, during hangup(). v2.9: Fixed a problem with getopt(). You can specify a logfile with the -l option (run it with -h for help, to see how to use it). A nice nice new feature. You can now read numbers from a config file (without the '-'s). Just put the plain number into a config file. 5551234 to dial 555-1234, or 14565551234 to dial 1-456-555-1234. I will soon add the ability to use '-'s or ()'s for the area code. v3.0: You can now use a config file with '-'s. So to dial 3 numbers..do: dial-nums: 555-5643 554-3453 1-800-675-3544 (You would then run: shokdial -c dial-nums) v3.1: Added ability to use comments in config file So ShokDial has been undergoing many changes to make it look nicer, work better, user friendly, attractive, an occasionaly fix. Things like this. Please ALWAYS check this file before you do anything else ;) v3.2: Fixed a bug, with the sprintf() and printf()'s...because if you would enter 555-0000, it would try to dial 555-0, due to forgetting the ".4", the precision. v3.3: Noticed a mistake of not stripping out new lines out of the phone number from the config file when using -c. Hence, it would actually be doing "ATDT ...\n\r", which isn't right. v3.4: Completely redid all the alignment, so I could fit more things in one line. Now prints statistics, on the number of times connected, number of times the phone number was busy, and number of no responses (timed out). v3.5: Changed the variables modified by the sig handlers to type volatile. v3.6: Added a menu that is called when someone tries to abort the program. From there you are given the option to skip to the next number, or exit the program. Changed sigaction()'s to signal()'s, for compatibility with non-posix systems. v3.7: Realized that my new menu never reset the timer when you skipped to the next number, so that it would eventually timeout from the old one and skip the new one. v3.8: Added termcap so that I could clear the screen. I will be adding ncurses for a GUI shortly. v3.9: Added -s option to allow you to pass input via stdin. It will not check the number (along with -c for config files) to allow you to enter odd strings for formats other than those used in the US and things such as "5551234,,,,1,#" that you might see when dialing a pager. I also printed some bugs with logging the numbers. v4.0: Added ability to send a string to the carrier, and to read a response from the carrier (or return a time out otherwise). Fixed up the code a bit, style, etc. This was a pretty big upgrade. In the process, the old -s for stdin has now become -S, and the -l for logfile has now become -L. The new -s means "send a string to the carrier" and the -l means "read a response from the carrier". Also fixed a minor printing bug in the statistics. v4.1: Fixed several compatibility problems, a coding error (bad scanf), and rewrote the Makefile (much nicer).